//
//  DigitalView.h
//  GJDigitalSDK
//
//  Created by 吴棒棒 on 2021/10/30.
//

#import <UIKit/UIKit.h>
#import <GJDigitalSDK/DigitalMessage.h>

NS_ASSUME_NONNULL_BEGIN
@protocol DigitalViewDelegate <NSObject>

@optional

/// 错误信息返回
/// @param error error
- (void)onError:(NSError *)error;
/// 会话建立成功
- (void)onChatCreate;

/// 中控获取到渲染端信息后通知客户端
/// @param ID id
/// @param name name
- (void)onRender:(NSString *)ID name:(NSString *)name;

/// 中控获取到播放话术后将字幕以及话术指令推送给客户端
/// @param dic 字幕以及话术指令
- (void)onCommand:(NSDictionary *)dic;

/// 当前中端回调的事件
/// @param msg 事件名字
- (void)onCustomMsg:(NSString *)msg;

/// webrtc连接状态回调
/// @param state RTCIceConnectionState
- (void)didIceConnectionChange:(RTCIceConnectionState)state;

/// 中控获取不到渲染端信息后通知客户端繁忙
- (void)onBusy;

/// 中控结束通话，发送bye事件
- (void)onByeBye;

@end
@interface DigitalView : UIView

@property (nonatomic, weak) id<DigitalViewDelegate> delegate;
@end

NS_ASSUME_NONNULL_END
